export function uniqueID(digits = 9) {
  const generatedIds = new Set();
  return () => {
    let id;
    do {
      id = "";
      for (let i = 0; i < digits; i++) {
        id += Math.floor(Math.random() * 10);
      }
    } while (generatedIds.has(id));
    generatedIds.add(id);
    return id;
  };
}
